#include "hc595.h"



void hc595_init()
{
	P0MDOUT |=0x07;
	
}

void hc595_send_data(u8 dat)
{
	u8 i;
	
	for(i=0;i<8;i++)
	{
		if(dat&0x80)
			HC595_SI_HIGH();
		else
			HC595_SI_LOW();
	
		HC595_SCK_LOW();
		dat <<= 1;
		HC595_SCK_HIGH();
	}
	
	HC595_RCK_LOW();
	HC595_RCK_HIGH();
	
}


